<template>
  <div>
    <div class="colorBlock" :style="state.style"></div>
  </div>
</template>
<script lang="ts" setup>
import { onMounted, reactive, inject } from "vue";
import type { TableColumn, TableRow, OptButton } from "@/utils/baTable"; //表格列行类型

// BuildAdmin将自动为此组件传递五个Props
interface Props {
  renderValue: any; // 单元格值
  renderRow: TableRow; // 当前行数据
  renderField: TableColumn; // 当前列数据
}

const props = withDefaults(defineProps<Props>(), {});

const state: { style: any } = reactive({
  style: { background: props.renderRow.rgba },
});

onMounted(() => {
  console.log("TagVue单元格值", props.renderField.prop, props.renderRow.rgba);
});
</script>
<style lang="scss" scoped>
.colorBlock {
  text-align: center;
  width: 15px;
  height: 15px;
  margin: 0 auto;
}
</style>
